


function $_App(){
    this.queue = new $_AjaxQueue(Global.queueCapacity);
}
$_App.prototype = {
	/**
	 * 初始化
	 */
	init : function () {
	    Global.queue=this.queue;

		this.headerPanel = new $_Header().init();
	
	    this.centralPanel={
	        region     : "center",
			id         : Global.STD_PORTAL.id,
			xtype      : Global.STD_PORTAL.xtype,
			url        : CONFIG_URL_CENTER_PANEL,
			defaults : {
				autoScroll : true
			},
			//autoWidth       : true,
			width      : RIGHT_WINDOW_WIDTH,
			//plain      : true,
			draggable  : false,
			items     : [{
				width   :  '100%'
				,height : 	'100%',
				xtype  : 'mainwindow-win'
				,y      : 2
				,x      : 2
				,listeners : {
					show : function (win) {
						var portal = Ext.getCmp("std-panel");
						portal.addWindow(win);
					}
				}
			}]
	    };  
	        
	   	this.westPanel = new $_Menu().getMenu({
	   		url:CONFIG_URL_WEST_PANEL,
	   		title:CONFIG_LOGIN_USER
//	   		,width:120
	   	});
	    
	   	this.southPanel = {
			region :'south',
			height :20,
			border : false,
			items  :[{
				title  : '<div align="center">版权所有©</div>'
			}]
		};
		
		this.viewport = new Ext.Viewport({
	        layout:'border',
	        defaults: {
//    collapsible: true,
    split: true
//    bodyStyle: 'padding:15px'
},

	        items:[
	        	this.headerPanel,
	        	this.westPanel,
	        	this.centralPanel,
	        	this.southPanel	
	        ]
	    });
	    
	},
	
	
	getCenterH : function() {
		return document.body.clientHeight - this.southPanel.height - this.headerPanel.height - 56;
	},
	
	getCenterW : function() {
		return document.body.clientWidth - this.westPanel.width;
	}
	

}





